/**
 * author:Administrator
 * date:2016/2/24
 * desc:TODO
 */

'use strict';

let seq = 1;
let list = {};


class CouponLogRepoImpl {

  static * genId() {
    return 'couponcustomer_' + (seq++);
  }

  static * find(id) {
    return list[id];
  }

  static * store(couponLog) {
    if (!couponLog.id) couponLog.id = yield CouponLogRepoImpl.genId();
    list[couponLog.id] = couponLog;
  }

}
module.exports = CouponLogRepoImpl;